Field of the Invention
The present invention relates to an image processing apparatus, a controlling method in the image processing apparatus, and a computer-readable recording medium which stores a program.
Description of Related Art
Heretofore, there has been known a configuration where green noises are superimposed on image data when image data of multiple values are binarized by error diffusion processing (e.g. see Japanese Patent Application Laid-Open Publication No. 2008-219291).
FIG. 13 is a block diagram illustrating processing contents of a conventional error diffusing section 100 having a configuration to superimpose the green noises.
In FIG. 13, the error diffusing section 100 receives input data having multiple pixel values (e.g. 8 bits). A first adder section 101 adds, to input data of a target pixel, an error integrated value that is output from an error integrating section 105 and should be diffused from pixels (peripheral pixels) surrounding the target pixel. A second adder section 102 adds a green noise value output from a green noise generating section 103 to the output value of the first adder section 101. A binarizing section 104 compares the output values of the second adder section 102 with a predetermined threshold value, and outputs a binarization result (binary image data).
The green noise generating section 103 previously stores the binarization results of the pixels binarized earlier than the target pixel, and outputs the green noise superimposed on the target pixel on the basis of the binarization results of the peripheral pixels. Specifically, the green noise generating section 103 outputs the green noise on the basis of the binarization results of the peripheral pixels and a filter (green noise filter) having predetermined weighting factors with respect to the respective peripheral pixels. The second adder section 102 adds the output green noise to the output value of the first adder section 101.
A subtractor section 106 subtracts the output value of the first adder section 101 from the binarization result output from the binarizing section 104, and outputs an error value due to binarization executed by the binarizing section 104.
The error integrating section 105 previously stores the error values of the pixels binarized earlier than the target pixel, and outputs the error integrated value diffused to the target pixel on the basis of the error values of the peripheral pixels. Specifically, the error integrating section 105 outputs the error integrated value on the basis of the error values of the peripheral pixels and a filter (error integration filter) having predetermined weighting factors with respect to the respective peripheral pixels. The first adder section 101 adds the output error integrated value to the input data of the target pixel.
The above-described conventional error diffusion processing, which superimposes the green noises, feeds back the binarization results of the pixels binarized earlier than the target pixels into a binarization processing of the target pixel. According to this feedback, when the peripheral pixels include a black pixel(s) (pixel(s) whose binarization result is one (1)), the target pixel tends to become a black pixel, which makes the black pixels more concentrated in the binarized image. As a result, the image can be prevented from being uneven when being formed based on the binary image, and density reproductivity can be improved even when image formation conditions such as temperature and humidity fluctuate.
However, with the conventional error diffusion processing, which superimposes the green noises, periodic patterns (artifacts) occur when a uniform image having an intermediate density as input data is binarized, and accordingly quality of the after-binarization output image lowers.
This is because the black pixels appear at a predetermined period due to two conditions occurring at the same time, the conditions including: a first condition that the green noise takes the value at which the target pixel tends to become the black pixel, when the black pixels in the binarization results of the peripheral pixels coincide with the predetermined arrangement corresponding to the weighting factors of the green noise filter, and therefore the target pixel tends to be binarized into the black pixel by the superimposed green noise in the intermediate density in which the arrangement of the black pixels starts to coincide with a predetermined arrangement corresponding to the predetermined weighting factors of the green noise filter; and a second condition that when the target pixel is binarized into the black pixel in the intermediate density, large negative errors are diffused to the pixels binarized after that.
Such artifacts hardly occur in a low density image, because there are few black pixels in the binarization results of the peripheral pixels of the low density image and the green noise has little influence on the image. The artifacts hardly occur also in a high density image in comparison with the intermediate density image, because the input data itself have large values in the case of the high density image, accordingly errors due to binarization into black pixels are small, and large negative errors are hardly diffused to the pixels binarized after the target pixel. Even when some artifacts occur in the high density image, the artifacts are often less represented in the formed image, because a white pixel(s) (pixel(s) whose binarization result is zero (0)) tends to become blurred when the high density image having a high black pixel density is formed.
Thus, with the conventional error diffusion processing, which superimposes the green noises, the artifacts such as the ones illustrated in FIG. 14 occur in the intermediate density of the image after the error diffusion processing, which lowers the quality of the output image. This occurs not only to a so-called binary error diffusion processing which binarizes the input data of multiple values, but also to a so-called multivalue error diffusion processing which converts the input data of multiple values into multivalue data having a number of bits less than that of the input data.